<?php

//Magic!

require('../Magic/magic.php');
$userSys = new UserSystem();

if($_GET['logout']=='out'){
	$userSys->logout();
	header("location: index.php");
	die();
}

if(isset($_POST)){
	//lazy, assume its post
	$userSys->login($_POST['username'],$_POST['password']);
	header("location: index.php");
	die();
}
